<?php defined( '_SYS' ) or die( 'No direct script access allowed' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title><?php echo $this->title; ?></title>
<?php echo $this->headData; ?>
</head>
<body>

	<div id="toolbar-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>
		<div class="m">
			<div class="toolbar" id="toolbar">
				<table class="toolbar">
					<tr>
						<td class="button" id="toolbar-save">
							<a href="#" onclick="javascript: submitbutton('save')" class="toolbar">
								<span class="icon-32-save" title="Save">
								</span>
							<?php echo C_text::_('Save');?>
							</a>
						</td>

						<td class="button" id="toolbar-apply">
							<a href="#" onclick="javascript: submitbutton('apply')" class="toolbar">
								<span class="icon-32-apply" title="Apply">
								</span>
							<?php echo C_text::_('Apply');?>
							</a>
						</td>

						<td class="button" id="toolbar-cancel">
							<a href="#" onclick="javascript: submitbutton('cancel')" class="toolbar">
								<span class="icon-32-cancel" title="Cancel">
								</span>
							<?php echo C_text::_('Cancel');?>
							</a>
						</td>
					</tr>
				</table>
			</div>
			<div class="header icon-48-user"><?php echo C_text::_('u_ToolBox');?> <small><small><?php echo $this->subTitle;?></small></small></div>	
			<div class="clr"></div>		
		</div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
			</div>
		</div>
	</div>
	<div class="clr"></div>
	<?php if($this->message) echo $this->message;?>
<div id="element-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>	
<div class="m">	
	
	
	<form action="<?php echo WEBSELF;?>/user" method="post" name="adminForm" autocomplete="off">
	<div class="col width-65" style="position:relative;">
		<fieldset class="adminform">
		<legend><?php echo C_text::_( 'User Details' ); ?></legend>
			<legend><?php echo C_text::_('u_Item1');?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label>
							<?php echo C_text::_( 'Name' ); ?>
						</label>
					</td>
					<td>
						<input type="text" name="admin_name" id="admin_name" class="inputbox" size="40" value="<?php echo $this->user->admin_name; ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'Username' ); ?>
						</label>
					</td>
					<td>
						<input type="text" name="admin_id" id="admin_id" class="inputbox" size="40" value="<?php echo $this->user->admin_id; ?>" autocomplete="off" />
					</td>
				</tr>				
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'NewPassword' ); ?>
						</label>
					</td>
					<td>
						<input class="inputbox" type="password" name="password" id="password" size="40" value=""/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'VerifyPassword' ); ?>
						</label>
					</td>
					<td>
						<input class="inputbox" type="password" name="password2" id="password2" size="40" value=""/>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'E-Mail' ); ?>
						</label>
					</td>
					<td>
						<input class="inputbox" type="text" name="admin_email" id="admin_email" size="40" value="<?php echo $this->user->admin_email; ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'Gender' ); ?>
						</label>
					</td>
					<td>
						<?php echo C_HTML::_('select.booleanlist', 'admin_sex', 'class="inputbox"', $this->user->admin_sex,'Female','Male');?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'Tel' ); ?>
						</label>
					</td>
					<td>
						<input class="inputbox" type="text" name="admin_tel" id="admin_tel" size="40" value="<?php echo $this->user->admin_tel; ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'Mobile' ); ?>
						</label>
					</td>
					<td>
						<input class="inputbox" type="text" name="admin_mobile" id="admin_mobile" size="40" value="<?php echo $this->user->admin_mobile; ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'QQ' ); ?>
						</label>
					</td>
					<td>
						<input class="inputbox" type="text" name="admin_qq" id="admin_qq" size="40" value="<?php echo $this->user->admin_qq; ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'MSN' ); ?>
						</label>
					</td>
					<td>
						<input class="inputbox" type="text" name="admin_msn" id="admin_msn" size="40" value="<?php echo $this->user->admin_msn; ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'TaoBao' ); ?>
						</label>
					</td>
					<td>
						<input class="inputbox" type="text" name="admin_taobao" id="admin_taobao" size="40" value="<?php echo $this->user->admin_taobao; ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
						<label>
							<?php echo C_text::_( 'Introduction' ); ?>
						</label>
					</td>
					<td>
						<textarea name="admin_introduction" id="admin_introduction" cols="40" rows="5" ><?php echo $this->user->admin_introduction; ?></textarea>
					</td>
				</tr>						
				<?php if( $this->user->id ) { ?>
				<tr>
					<td class="key">
						<?php echo C_text::_( 'RegisterDate' ); ?>
					</td>
					<td>
						<?php echo $this->user->admin_register_date;?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<?php echo C_text::_( 'LastVisitDate' ); ?>
					</td>
					<td>
						<?php 
							if ($this->user->admin_modify_date == "") {
								$lvisit = C_text::_( 'Never' );
							} else {
								$lvisit	= $this->user->admin_modify_date;								
							}
						
						echo $lvisit; ?>
					</td>
				</tr>
				<?php } ?>
			</table>
		</fieldset>
	</div>
	
	<div class="col width-30" style="position:relative;">
		<fieldset id="user-groups">
			<legend><?php echo C_text::_('u_Item2');?></legend>
			<?php echo C_Html::_('access.usergroups', 'groups',array_values($this->groups)); ?>
		</fieldset>
	</div>	
	<div class="clr"></div>

	<input type="hidden" name="id" value="<?php echo $this->user->id; ?>" />
	<input type="hidden" name="cid[]" value="<?php echo $this->user->id; ?>" />
	<input type="hidden" name="apply" value="<?php echo $this->apply; ?>" />
	<input type="hidden" name="option" value="users" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="boxchecked" value="0" />
	<?php echo C_HTML::_( 'form.token' ); ?>
</form>
</div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
			</div>
		</div>
</div>
<center>
	Powered by <b><a href='http://www.metinfo.cn' target='_blank'>MetInfo</a></b> ©2008- <?php echo date('Y',time());?>&nbsp;<a href='http://www.metinfo.cn' target='_blank'>www.MetInfo.cn</a>
</center>
<?php echo $this->js; ?>
</body>
</html>